<?php
	require('classes/XSSClass.php');
	
	if (isset($_GET['srv'])) {
		$xss = new XSSClass();
		$srv = $xss->removeXSS(mysql_real_escape_string($_GET['srv']));
		
		if (strlen($srv)) {
			require('classes/JSON-RPCClass.php');
			require('classes/DatabaseClass.php');
			require('rpcClasses/'.$srv.'Class.php');
			$className = $srv."Class";
			$server = new JSON_RPC_Server(new $className);
			$server->run();
			$db = DBhandler::getInst();
			$db->close();
		}
	}
?>